<%@page import="cn.easybuy.entity.News"%>
<%@include file="../common/CheckLoginBackend.jsp"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="../statics/css/style.css" />
	<title>二组牛逼</title>
<script type="text/javascript" src="../statics/js/jquery.js"></script>
<script type="text/javascript">
	var contextPath = "${ctx}";
	function fan(pageNo) {
		window.location.href = "UserListServlet?action=pageShow&pageNo="
				+ pageNo;
	}
	function del(id) {
		var f = window.confirm("确定删除吗？");
		if (f) {
			window.location.href = "UserListServlet?action=del&id=" + id;
		}
	}
</script>
</head>
<body>
	<%@include file="../common/Admin_Header.jsp"%>
	<div class="i_bg bg_color">
		<!--Begin 用户中心 Begin -->
		<div class="m_content">
			<%@include file="../common/Admin_left.jsp"%>
			<div class="m_right" id="content">
				<div class="mem_tit">用户列表</div>
				<div class="mem_tit">
					<a href="Member_AddUser.jsp">添加用户</a>
				</div>
				<br />
				<table border="0" class="order_tab"
					style="width:930px; text-align:center; margin-bottom:30px;"
					cellspacing="0" cellpadding="0">
					<tbody>
						<tr>
							<td width="10%">用户名称</td>
							<td width="10%">真实姓名</td>
							<td width="5%">性别</td>
							<td width="10%">类型</td>
							<td width="10%" colspan="2">操作</td>

						</tr>
						<c:forEach items="${requestScope.page.list}" var="u" varStatus="v">
							<tr>
								<td>${u.loginName}</td>
								<td>${u.userName}</td>
								<td><c:if test="${u.sex==1}">男</c:if> <c:if
										test="${u.sex==0}">女</c:if>
								</td>
								<td><c:if test="${u.type==0}">管理员</c:if> <c:if
										test="${u.type==1}">用户</c:if>
								</td>
								<td><a href="UserListServlet?action=update&id=${u.id}">修改</a>
								</td>
								<td><c:if test="${LoginUser.id!=u.id}">
										<a href="javascript:del(${u.id})">删除</a>
									</c:if>
								</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
				<%@include file="../common/Page.jsp" %>
			</div>
		</div>
	</div>
	<%@include file="../common/footer.jsp"%>
</body>
</html>


